﻿Imports Display.SRAGWM

Namespace SRAGWM

    Public Class GenerateMap

        Shared Sub Generate(ByRef objms As MAPSRVLib.GWMMapServerHelper, ByVal Range As DefineRange, _
                            ByVal MapDetails As MapDetails)

            Dim AS1 = Nothing
            If (objms.AutoScales.Count = 0) Then
                AS1 = objms.AddRangeAutoScale("AS1")
            Else
                AS1 = objms.AutoScales("AS1")
            End If

            AS1.Multiplier = 1 * Range.MagFact
            AS1.MaximumWindow = Range.Maximum
            AS1.MinimumWindow = Range.Minimum

            objms.CreateMapByRange(MapDetails.Rng(0), MapDetails.Rng(1), MapDetails.Rng(2), MapDetails.Rng(3), _
                                   MapDetails.Width, MapDetails.Height, "AS1", AS1)

        End Sub

    End Class
End Namespace